﻿@model List<UserModel> 

@{
    ViewBag.Title = "Trips by User";
}

<h2>Trips by User</h2>

<div class="container">
    <table class="table table-striped">
        <thead>
        <tr>
            <th>
                Name
            </th>
            <th>
                Email
            </th>
            <th>
                Number Phone
            </th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        @for (var i = 0; i < Model.Count(); i++)
        {
            <tr>
                <td>
                    @Html.DisplayFor(m => m[i].Name)
                </td>
                <td>
                    @Html.DisplayFor(m => m[i].Email)
                </td>
                <td>
                    @Html.DisplayFor(m => m[i].NumberPhone)
                </td>
                <td>
                    @Html.ActionLink("Trips", "TripsByUserId", new {id = Model[i].Id})
                </td>
            </tr>
        }
        </tbody>
    </table>
</div>